package Others.DesignPattern.PrototypePattern.Pattern;

import Others.DesignPattern.PrototypePattern.Pattern.Object.Resume;
import Others.DesignPattern.PrototypePattern.Pattern.Object1.ShallowCloneResume;
import Others.DesignPattern.PrototypePattern.Pattern.Object1.ShallowWorkExperience;
import Others.DesignPattern.PrototypePattern.Pattern.Object2.DeepCloneResume;
import Others.DesignPattern.PrototypePattern.Pattern.Object2.DeepWorkExperience;

public class main {
    public static void main(String[] args) throws CloneNotSupportedException {
        //原型模式
        Resume DaNiao = new Resume("大鸟", "男", "29", "1998-2000", "阿里");
        DaNiao.show();
        Resume clone = (Resume)DaNiao.clone();
        clone.setCompany("腾讯");
        clone.show();


        System.out.println();
        //当然这里只是一个简单的浅克隆，如果Resume中存在引用对象，那么按照当前这样写是没有用的



    }
}
